//
//  Find_ActivityTableViewCellButton.m
//  SoundPill
//
//  Created by 宋旭东 on 16/7/31.
//  Copyright © 2016年 宋旭东. All rights reserved.
//

#import "Find_ActivityTableViewCellButton.h"
#import "UIViewExt.h"
@implementation Find_ActivityTableViewCellButton
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self createSubviews];
    }
    return self;
}
- (void)createSubviews
{
    self.bigImage = [[UIImageView alloc] initWithFrame:CGRectZero];
    [self addSubview:_bigImage];
    self.workName = [[UILabel alloc] initWithFrame:CGRectZero];
    _workName.numberOfLines = 0;
    _workName.font = [UIFont systemFontOfSize:13];
    _workName.textColor = [UIColor blackColor];
    [self addSubview:_workName];
    self.typeLable = [[UILabel alloc] initWithFrame:CGRectZero];
    _typeLable.textColor = [UIColor colorWithRed:0.549 green:0.553 blue:0.557 alpha:1.00];
    _typeLable.font = [UIFont systemFontOfSize:11];
    [self addSubview:_typeLable];
    self.price = [[UILabel alloc] initWithFrame:CGRectZero];
    _price.textColor = [UIColor colorWithRed:0.902 green:0.000 blue:0.000 alpha:1.00];
    _price.textAlignment = NSTextAlignmentRight;
    _price.font = [UIFont boldSystemFontOfSize:14];
    [self addSubview:_price];
    self.contentImg = [[UIImageView alloc] initWithFrame:CGRectZero];
    [self addSubview:_contentImg];
    self.contentLab = [[UILabel alloc] initWithFrame:CGRectZero];
    _contentLab.textColor = [UIColor colorWithRed:0.604 green:0.604 blue:0.604 alpha:1.00];
    _contentLab.font = [UIFont systemFontOfSize:13];
    [self addSubview:_contentLab];
    self.loveImg = [[UIImageView alloc] initWithFrame:CGRectZero];
    [self addSubview:_loveImg];
    self.loveLab = [[UILabel alloc] initWithFrame:CGRectZero];
    _loveLab.textColor = [UIColor colorWithRed:0.604 green:0.604 blue:0.604 alpha:1.00];
    _loveLab.font = [UIFont systemFontOfSize:13];
    [self addSubview:_loveLab];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _bigImage.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.width);
    _workName.frame = CGRectMake(_bigImage.left + 8, _bigImage.bottom, _bigImage.width - 16, _bigImage.height / 4);
    _typeLable.frame = CGRectMake(_workName.left, _workName.bottom, _workName.width, _workName.height / 2);
    _loveImg.frame = CGRectMake(_bigImage.left + 5, _typeLable.bottom, 20, 20);
    _loveLab.frame = CGRectMake(_loveImg.right, _loveImg.top, 20, 20);
    _contentImg.frame = CGRectMake(_loveLab.right, _loveImg.top, _loveImg.width, _loveImg.height);
    _contentLab.frame = CGRectMake(_contentImg.right, _contentImg.top, 30, 20);
    _price.frame = CGRectMake(_workName.left, _loveImg.top, _workName.width, _loveImg.height);
}
@end
